﻿using BodaNetCommunications.Utilities.Results;

using Newtonsoft.Json.Linq;

namespace BodaNetCommunications.CommBase.Interfaces
{
    public interface IDeviceOperation : IExtraInitAction
    {
        /// <summary>
        /// 不同的PLC可能有不同的连接参数，读写时，也可以有不同的参数，需要通过JObject去个性化配置
        /// </summary>
        /// <param name="ip"></param>
        /// <param name="port"></param>
        /// <param name="extraInfos"></param>
        /// <returns></returns>
        BodaResult<bool> Connect(string ip, string port, JObject extraInfos);

        void DisConnect();

        bool Isconnected();
    }
}